package gdut.stream.quote;

public class CatTest02 {
    public static void main(String[] args) {
        Integer age = 22;
        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("hello+tomcat+");
        StringBuffer catAge = CatUtils.getCatAge(age, new Cat<Integer, StringBuffer>() {
            @Override
            public StringBuffer myCat(Integer integer) {
                return stringBuffer.append(integer);
            }
        });
        System.out.println(catAge.toString());
        StringBuffer catAge2 = CatUtils.getCatAge(age, integer -> stringBuffer.append(integer));
        System.out.println(catAge2.toString());
        StringBuffer catAge3 = CatUtils.getCatAge(age, stringBuffer::append);
        System.out.println(catAge3.toString());
    }
}
